/*
 * CRtpUnPacker.h
 *
 *  Created on: 2018年4月21日
 *      Author: chuanjiang.zh@qq.com
 */

#ifndef CRTPUNPACKER_H_
#define CRTPUNPACKER_H_

#include "RtpPacker.h"
#include "DoubleByteBuffer.h"

namespace av
{

class CRtpUnPacker : public RtpUnPacker
{
public:
	CRtpUnPacker();
	virtual ~CRtpUnPacker();

	virtual bool open(int mediaType, int codec);

	virtual bool unpack(RtpPacket& pktIn, MediaPacket& pktOut);

	virtual void close();

	virtual bool getFormat(MediaFormat& format);

protected:
	int m_mediaType;
	int	m_codec;

	MediaFormat	m_format;
	DoubleByteBuffer	m_buffer;

	uint32_t    m_lastTs;

};


} /* namespace av */

#endif /* CRTPUNPACKER_H_ */
